package com.fan.base.aspect;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;

@Aspect
public class ServiceLogAspectAnnotation {
	
	/**
	 * 前置通知，方法执行前执行
	 * @param joinPoint
	 */
	@Before("pointcut()")
	public void before(JoinPoint joinPoint) {
		
	}
	/**
	 * 环绕通知，在方法执行前后通知
	 * @param joinPoint
	 */
	@Around("pointcut()")
	public Object arount(ProceedingJoinPoint joinPoint) {
		return null;
	}
	
	/**
	 * 返回通知，方法返回后通知
	 * @param joinPoint
	 */
	@AfterReturning("pointcut()")
	public void afterReturning(JoinPoint joinPoint) {
		
	}
	/**
	 * 后置通知，方法执行后通知
	 * @param joinPoint
	 */
	@After("pointcut()")
	public void after(JoinPoint joinPoint) {
		
	}
	/**
	 * 异常通知，方法抛出异常后处理
	 * @param joinPoint
	 */
	@AfterThrowing("pointcut()")
	public void afterThrowing(JoinPoint joinPoint, Exception ex) {
		
	}

}
